package com.sgb.knowledgeshare.service;

import com.sgb.knowledgeshare.entity.FollowListEntity;
import com.sgb.knowledgeshare.entity.MagessListEntity;
import com.sgb.knowledgeshare.entity.ReceiveLaudEntity;
import com.sgb.knowledgeshare.entity.ShareDictEntity3;
import com.sgb.knowledgeshare.entity.ShareLoginEntity;
import com.sgb.knowledgeshare.entity.ShareMagCountEntity;
import com.sgb.knowledgeshare.entity.ShareUserInfoEntity;
import com.sgb.knowledgeshare.entity.TabelListEntity;
import com.sgb.knowledgeshare.entity.UserMsgEntity;
import com.sgb.knowledgeshare.entity.VideoCommentListEntity;
import com.sgb.knowledgeshare.entity.VideoReceiveListEntity;
import com.swgk.core.base.model.entity.H5ReEntity;
import com.swgk.core.view.entity.AliProofEntity;
import com.swgk.core.view.entity.VideoTypeListEntity;
import com.swgk.core.base.model.entity.BaseEntity;
import com.swgk.core.base.model.entity.VideoBean;
import com.swgk.core.base.model.factory.BaseUrlInterceptor;
import com.swgk.core.view.entity.VideoListEntity;

import java.util.List;
import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;

public interface ShareModuleApi {

    /**
     * 用户登陆
     *
     * @param username 登录的用户名
     * @param password 登录的密码
     * @return 返回的对象，包括权限之类的
     */
    @FormUrlEncoded
    @POST("v1/app/login")
    Call<BaseEntity<ShareLoginEntity>> login(@Field("username") String username, @Field("password") String password);

    //登陆后获取用户信息（包含个人及企业的认证状态）
    @Headers({BaseUrlInterceptor.HEADERS_URL_USER, "tokenType:pc"})
    @GET("v1/app/userInfo/getCurrentUserInfo")
    Call<BaseEntity<UserMsgEntity>> getUserInfo();

    //获取视频列表信息
    @POST("v1/app/collegeV1/firstPageList")
    Call<BaseEntity<VideoListEntity>> getFirstPageList(@Body Map map);

    //获取用户信息
    @POST("v1/app/collegeV1/userHomePage")
    Call<BaseEntity<ShareUserInfoEntity>> getUserHomePage(@Body Map map);

    //个人中心视频列表
    @POST("v1/app/collegeV1/myVodList")
    Call<BaseEntity<VideoListEntity>> getmyVodList(@Body Map map);

    //点赞的数据
    @POST("v1/app/collegeV1/like")
    Call<BaseEntity> getlike(@Body Map map);
    //点赞评论
    @POST("v1/app/collegeV1/like")
    Call<BaseEntity<Long>> getlikes(@Body Map map);

    //取消关注和关注接口
    @POST("v1/app/collegeV1/fens")
    Call<BaseEntity> getfens(@Body Map map);

    //添加播放次数
    @POST("v1/app/collegeV1/playVideo")
    Call<BaseEntity> getplayVideos(@Body Map map);

    //保存视频的操作
    @POST("v1/app/collegeV1/saveVideo")
    Call<BaseEntity> getsaveVideo(@Body Map map);

    //获取视频参数
    @POST("v1/app/collegeV1/getVideoParams")
    Call<BaseEntity<AliProofEntity>> getVideoParams(@Body Map map);

    //根据分类获取视频列表
    @POST("v1/app/collegeV1/getVideoListByType")
    Call<BaseEntity<VideoListEntity>> getVideoListByType(@Body Map map);

    //获取用户关注列表数据
    @POST("v1/app/collegeV1/getFollowList")
    Call<BaseEntity<FollowListEntity>> getFollowList(@Body Map map);

    //获取用户粉丝列表数据
    @POST("v1/app/collegeV1/getFensList")
    Call<BaseEntity<FollowListEntity>> getFensList(@Body Map map);

    //获取举报类型列表数据
    @POST("v1/app/collegeV1/reportType")
    Call<BaseEntity<List<ShareDictEntity3>>> getReportType();
    //举报视频
    @POST("v1/app/collegeV1/report")
    Call<BaseEntity> getReport(@Body Map map);

    //消息模块我收到的赞
    @POST("v1/app/collegeV1/receiveLaud")
    Call<BaseEntity<ReceiveLaudEntity>> getReceiveLaud(@Body Map map);

    //删除视频
    @POST("v1/app/collegeV1/deleteMyVideo")
    Call<BaseEntity> getDeleteMyVideo(@Body List<Long> list);

    //根据视频id拿到播放的东西
    @POST("v1/app/collegeV1/getPlayUrl")
    Call<BaseEntity<VideoBean>> getPlayUrl(@Body Map map);

    //获取系统消息
    @POST("v1/app/collegeV1/getMsgList")
    Call<BaseEntity<MagessListEntity>> getMsgList(@Body Map map);

    //获取系统消息
    @POST("v1/app/collegeV1/getMsgCount")
    Call<BaseEntity<ShareMagCountEntity>> getMsgCount();

    //获取发布视频类型接口
    @POST("v1/app/collegeV1/getCategoryTree")
    Call<BaseEntity<List<VideoTypeListEntity>>> getCategoryTree();

    //获取收到的评论接口
    @POST("v1/app/collegeV1/getVideoReceiveList")
    Call<BaseEntity<VideoReceiveListEntity>> getVideoReceiveList(@Body Map map);

    //获取一级评论列表
    @POST("v1/app/collegeV1/apiGetVideoCommentList")
    Call<BaseEntity<VideoCommentListEntity>> apiGetVideoCommentList(@Body Map map);

    //获取二级评论列表
    @POST("v1/app/collegeV1/apiGetVideoReplyList")
    Call<BaseEntity<VideoCommentListEntity.RecordsBeanX>> apiGetVideoReplyList(@Body Map map);

    //根据id删除评论
    @POST("v1/app/collegeV1/apiDeleteCommentById")
    Call<BaseEntity> apiDeleteCommentById(@Body Map map);

    //新增主评论
    @POST("v1/app/collegeV1/addVideoComment")
    Call<BaseEntity<VideoCommentListEntity.RecordsBeanX>> addVideoComment(@Body Map map);

    //新增二级评论
    @POST("v1/app/collegeV1/addVideoComment")
    Call<BaseEntity<VideoCommentListEntity.RecordsBeanX.RecordsBean>> addSecondVideoComment(@Body Map map);

    //根据视频id获取评论数
    @POST("v1/app/collegeV1/getCommentCount")
    Call<BaseEntity<ShareDictEntity3>> getCommentCount(@Body Map map);

    //根据UserNo去获取当前用户标签列表
    @POST("v1/app/collegeV1/getLabelByUserNO")
    Call<BaseEntity<List<TabelListEntity>>> getLabelByUserNO(@Body Map map);

    //根据标签名称模糊查询标签列表
    @POST("v1/app/collegeV1/getLabelList")
    Call<BaseEntity<List<TabelListEntity>>> getLabelList(@Body Map map);

    //根据标签no查视频列表
    @POST("v1/app/collegeV1/getVideLabelPage")
    Call<BaseEntity<VideoListEntity>> getVideLabelPage(@Body Map map);

    //首页知识分享视频列表
    @POST("v1/app/collegeV1/getIndexVodList")
    Call<BaseEntity<VideoListEntity>> getIndexVodList(@Body Map map);

    //获取视频信息
    @POST("v1/app/collegeV1/getVodListByCondition")
    Call<BaseEntity<VideoListEntity>> getVodListByCondition(@Body Map map);

    //租赁首页-视频列表
    @POST("v1/app/collegeV1/getVodListByName")
    Call<BaseEntity<VideoListEntity>> getHomeVideoList(@Body Map map);

    //知识分享接口
    @POST("v4/app/recruit/memberVideoShare")
    Call<BaseEntity<VideoListEntity>> memberVideoShare(@Body Map map);

    //货主  订单详情  H5
    @FormUrlEncoded
    @POST("v1/app/common/getUrlSetting")
    Call<BaseEntity<H5ReEntity>> getUrlSetting(@Field("param") String param);

    //上传单个文件
    @Multipart
    @POST("v1/app/common/fileUpload")
    Call<BaseEntity> uploadFile(@PartMap Map<String, RequestBody> files);
}
